#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main() {
    char arr[5];
    scanf("%s", arr);
    for (int i = 3; i >= 0; i--)
    {
        printf("%c", arr[i]);
    }
    return 0;
}